<html>
<head>
<h1>Update/Edit Person</h1>
</head>
<body>

<form action="DisplayPage.php" method="GET">
SSN: <input type='text' name = 'ssn' /> <br/>

<input type='submit' name = 'search' value='Search'/>

</form>
</body>
<?php
	if(!isset($_GET["ssn"])) {
		return;
	}
	require "config.php";
	$ssn = $_GET['ssn'];
	
	$con = mysql_connect("localhost",$db_user ,$db_pass);
	// if an error was encountered, the script exits with an error message
	if (!$con){
		die('Could not connect: ' . mysql_error());
    }
	//after successfully connecting with the database server, select the database with which you want to communicate
	mysql_select_db($db_name, $con);
	
	
	$query1 = "select * from person where SSN = $ssn";
	$result1 = mysql_query($query1);
	if($result1){
		$personSSN = $ssn;
		require_once 'PersonProfile.php';
     }
	mysql_close($con);

?>
<a href="MainMenu.php">Home</a>

